1. Field of the Invention
This invention relates to electronic circuits, and more particularly, to efficiently storing traces of multiple components in an embedded system.
2. Description of the Relevant Art
A system-on-a-chip (SOC) integrates multiple functions into a single integrated chip substrate. The functions may include digital, analog, mixed-signal and radio-frequency (RF) functions. Typical applications are used in the area of embedded systems. Cellular phones, smartphones, portable communication devices, tablet computers, entertainment audio/video (A/V) devices, and even chip in automobiles are some examples of systems using an SOC. An SOC may use processors that execute operating system (OS) software. In addition, the SOC may be connected to both external memory chips, such as Flash or RAM, and various external peripherals.
As integration on an SOC increases, the interrelationships between on-die components become more complex. In addition, embedded systems may not have a basic-input-output-software (BIOS) or machine abstraction layer to insulate the operating system (OS) from low-level device management. Therefore, the kernel in the OS may handle these tasks. The shortening time-to-market coupled with the increasing complexity of both hardware and software creates a number of challenges to verify embedded system designs.
Basic run-control debugging includes single-stepping, breakpoints, and access to memory and a component's registers while the component is not running Basic run-control debugging typically uses a Joint Test Action Group (JTAG) interface. However, this type of debugging is obtrusive as it interferes with the program execution. In addition, setting breakpoints is not beneficial for debugging real-time embedded systems.
Another type of debugging includes an unobtrusive real-time collection of a history during program execution. A stored program history allows designers to perform a walk through of a program to a point of failure, which benefits investigations of intermittent and real-time failures. Software and hardware traces provide a historical account of application code execution, behavior, timing, and data accesses. A hardware trace is on-die logic that may monitor one or more of an address, data, and control signals within the SOC and sends corresponding information to be stored in a trace capture buffer, or trace buffer. The trace buffer is typically an on-die circular buffer that continuously captures trace information until halted.
Capturing program and data traces for a complete program unobtrusively and in real-time may require large on-die trace buffers and wide trace ports. A large amount of distributed trace hardware may still miss the temporal relationship between asynchronous requests across the SOC. Even reduced hardware support for integrating hardware traces on the SOC and sending out information through trace ports consumes on-die real estate. Therefore, designers prefer a limited amount of debug hardware on the SOC, but also debug hardware that provides flexibility and a high degree of visibility to the activities occurring on the SOC.
In view of the above, methods and mechanisms for efficiently monitoring traces of multiple components in an embedded system are desired.